lua require("plugins.plugins-setup")
lua require("core.options")
lua require("core.keymaps")
" ----------------------- 插件-----------------------
lua require("plugins.coc-nvim")
lua require("plugins.lualine")
lua require("plugins.bufferline")
lua require("plugins.treesitter")
lua require("plugins.nvim-tree")
lua require("plugins.web-devicons")
lua require("plugins.vim-floaterm")
lua require("plugins.autopairs")
lua require("plugins.comment")
lua require("plugins.indent-blakline")




" -- grep设置
" set grepprg=ack\ --nogroup\ --column\ $*
" set grepformat=%f:%l:%c:%m

" --设置最大字符折
set wrap


" ----------------------- 检测文件类型，自动设置缩进 -----------------------
if has("autocmd")
    filetype on
    autocmd FileType html setlocal ts=2 sts=2 sw=2 et
    autocmd FileType vue setlocal ts=2 sts=2 sw=2 et
    autocmd FileType js setlocal ts=2 sts=2 sw=2 et
endif
" ----------------------- 插件-----------------------
" -- coc-snippets
" Use <C-l> for trigger snippet expand.
imap <C-l> <Plug>(coc-snippets-expand)
" Use <C-j> for select text for visual placeholder of snippet.
vmap <C-j> <Plug>(coc-snippets-select)

" Use <C-j> for jump to next placeholder, it's default of coc.nvim
let g:coc_snippet_next = '<c-j>'

" Use <C-k> for jump to previous placeholder, it's default of coc.nvim
let g:coc_snippet_prev = '<c-k>'

" Use <C-j> for both expand and jump (make expand higher priority.)
imap <C-j> <Plug>(coc-snippets-expand-jump)

" Use <leader>x for convert visual selected code to snippet
xmap <leader>x  <Plug>(coc-convert-snippet)

" Make <tab> used for trigger completion
" inoremap <silent><expr> <TAB>
"      \ coc#pum#visible() ? coc#_select_confirm() :
"      \ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
"      \ CheckBackspace() ? "\<TAB>" :
"      \ coc#refresh()
"
" function! CheckBackspace() abort
"  let col = col('.') - 1
"  return !col || getline('.')[col - 1]  =~# '\s'
" endfunction
"
" let g:coc_snippet_next = '<tab>'
" ----------安装插件--------------------------------
call plug#begin('~/.config/nvim/plugged')

Plug 'honza/vim-snippets'
Plug 'godlygeek/tabular'
Plug 'voldikss/vim-floaterm'


call plug#end()  
